﻿using System.Data.Entity.ModelConfiguration;
using QDT.Core.Assignments;

namespace QDT.Core.MSData.Mapping
{
    public class AssignmentMapping : EntityTypeConfiguration<Assignment>
    {
        public AssignmentMapping()
        {
            HasKey(x => x.ID);
            Property(x => x.InnerStatus).HasColumnName("Status");
            HasRequired(x => x.Project).WithMany().HasForeignKey(x => x.ProjectId);

            Ignore(x=>x.Status);
            ToTable(DB.TPref("assignment"));
        }
    }
}
